Hall sensor alignment for BLDC motor

ABSTRACT

A technique for determining an alignment error of a Hall sensor location in a brushless DC motor drive, by measuring the back EMF waveform, preferably while the motor is coasting. According to the technique, an angular offset is calculated between a selected BEMF waveform and a selected Hall signal. Such offsets are preferably calculated for each phase individually. The offsets may be advantageously stored in the motor control unit and used to adjust the output motor control signals for maximum torque.

CROSS REFERENCE TO RELATED APPLICATION

The present application is based upon and claims priority of U.S.Provisional Application Ser. No. 60/579,037 filed Jun. 11, 2004,incorporated by reference in its entirety.

BACKGROUND OF THE INVENTION

The present invention relates to a brushless DC motor drive, and moreparticularly to a method and system for determining an alignment errorof a Hall sensor in such a drive, advantageously for optimizing thelocation of the Hall sensor.

Brushless DC motor drives commonly use Hall-effect sensors to determinerotor position. The Hall sensors sense the magnetic field of a magnet onthe rotor, and produce a digital pattern indicating the rotor positionin one of 6 possible sectors. Errors are introduced due to the relativemechanical locations of the Hall sensor and the magnet, the resolutionand accuracy of the sensor, the pole width of the sense magnet, and thephysical relationship between the sense magnet and the rotor. Because ofthese potential sources of error, the position measured by the Hallsensors may not exactly match the real rotor position. This positionerror can cause generation of lower torque at a given current.

SUMMARY OF THE INVENTION

To address and avoid these potential sources of error, a technique hasbeen developed to determine an alignment error of a Hall sensor locationin a brushless DC motor drive, by measuring the back EMF waveformpreferably while the motor is coasting.

The technique is characterized in that an angular offset is calculatedbetween a selected BEMF waveform and a selected Hall signal. Suchoffsets are preferably calculated for each phase individually. Theoffsets may be advantageously stored in the motor control unit and usedto adjust the output motor control signals for maximum torque.

The disclosed techniques have been tested and found to give good resultssubstantially independent of changes in speed.

Other features and advantages of the present invention will becomeapparent from the following description of embodiments of the inventionwhich refers to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of a circuit arrangement for practicingthe invention,

FIG. 2 is a graph illustrating generically a phase offset of the type tobe measured,

FIG. 3 is a graph illustrating an analysis of Phase U Hall signals andPhase U back EMF (BEMF) signals according to an embodiment of theinvention,

FIG. 4 is a graph showing a Phase W Hall signal and a Phase U BEMFsignal,

FIG. 5 illustrates a calculating method usable thereon,

FIG. 6 is a graph showing a Phase W Hall signal and a Phase W BEMFsignal, and

FIG. 7 illustrates a calculating method usable thereon.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

A technique has been developed whereby an external unit which cancontrol the BLDC motor under test, and which has electrical access tothe motor phase voltages, can measure and indicate how to correct theHall alignment.

An example of such an arrangement is shown in FIG. 1, comprising a PC10, a communication converter 12, a motor with an electronic controlunit (ECU) 14 and a power supply 16. In an example of a test procedure,the PC controls the communication converter to start Hall alignment. Thecommunication converter controls the ECU to run the motor at a selectedspeed and to enter Hall alignment mode. Then the ECU stops the motordrive, allowing the motor to coast, and the communication converterbegins sensing the Hall and BEMF signals over the lines 18 and the linesCANH/CANL. The communication converter calculates a phase advance ifneeded to correct a Hall alignment error and controls the ECU to storesuch phase advance in an EEPROM, for example, for use in correcting therotor position signals for controlling the motor drive to producemaximum torque.

See FIG. 2 for a generic illustration of the methodology. A Hall sensormisalignment is detected as a phase error D between an edge of a Hallsignal (here a falling edge) H and a local minimum M of a back-EMFsignal B. Once measured, the phase error D may be stored in theelectronic motor control unit for use in compensating the motor controlsignals and increasing the generated torque.

In an example of the technique, the Phase U Hall signal will be alignedwith the Phase U BEMF. All measured times are referenced back to theHall signal. See FIG. 3.

Assuming the motor is rotating at a constant speed w(RPM) then the Hallsignal will have a frequency f(Hz) given by:f=3*w/60  (1)

In general, a periodic signal can be expressed as a Fourier series:G(t)=a ₀/2+a ₁ cos(2Πf*t)+b ₁ sin(2Πf*t)+a ₂ cos(4Πf*t)+b ₂sin(4Πf*t)+  (2)

Given that we have defined time=0 to be at the rising edge of the Hallsignal, then the Fourier series of the Hall signal can be expressed as:G(t)=a ₀/2+b ₁ sin(2Πf*t)+b ₂ sin(4Πf*t)+b ₃ sin(6Πf*t)+  (3)

If we ignore or assume the DC component is 0 i.e. a₀=0, then:G(t)=b ₁ sin(2Πf*t)+b ₂ sin(4Πf*t)+b ₃ sin(6Πf*t)+  (4)And, when t=n/f (where n=0, 1, 2, 3 . . . ) then: G(t)=0  (5)

Alternatively, by looking at the fundamental frequency only we canwrite:G(t)=0 when sin(2Πf*t)=0  (6)2Πf*t=n*2Π  (7)f*t−n=0  (8)

Equation (8) is the primary equation of interest. We cannot assume thatf is constant i.e. Δf=df/dt≠0. However, we will assume that d²f/dt²=0,i.e. acceleration is constant.

Frequency is actually a function of time, that is:F(t)=f−Δf*t  (9)

The motor will have a declining frequency when the motor is coasting andtherefore, substituting F(t) for f into equation (4), we obtain:G(t)=b ₁ sin(2Π(f−Δf*t)*t)+b ₂ sin(4Π(f−Δf*t)*t)+  (10)

Equations (6)-(8) can be re-written as follows:G(t)=0 when sin(2Π(f−Δf*t)*t)=0  (11)2Π(f−Δf*t)*t=n*2Π  (12)(f−Δf*t)*t−n=0  (13)Δf*t ² −f*t+n=0  (14)

In FIG. 1, it can be seen that time=T₁ represents the first zero i.e.when n=1 and that time=T₁+T₂ represents the second zero i.e. when n=2.

Hence, these substitutions can be made into equation (14):Δf*T ₁ ² −f*T ₁+1=0  (15)Δf*(T ₁ +T ₂)² −f*(T ₁ +T ₂)+2=0  (16)

In practice, with DSP we can accurately measure times T1 and T2. We cansubstitute these times into equations (15) and (16) and solve the twoequations for the two unknowns f and Δf. In general, the solutions for fand Δf can be expressed as follows:f=(T ₂ ²+2*T ₁ *T ₂ −T ₁ ²)/(T ₁ *T ₂*(T ₁ +T ₂))  (17)Δf=(f*T ₁−1)/T ₁ ²  (18)

The next step in determining the phase alignment error is finding thetime/angle at which the local minimum of the BEMF occurs, inrelationship to the Hall signal. Ideally this will occur at Π/6 radiansor 60 degrees.

Although DSP can be used to track the BEMF and determine the time of thelocal minimum directly, in practice measurement of this time would besubject to error due to noise. An alternative approach, which is moreimmune to error, is to set an arbitrary threshold voltage for the BEMFwaveform. The time/angle when the signal rises above this threshold isidentified as time=B₁ and the time it falls below it is time=B₂ Noiseerrors can be further reduced by setting this threshold based on theoutput of a moving average. In this case the time=B₁ is set at the timeof the last sample that forms the moving average that first equals orexceeds the threshold. The time=B₂ is set at the time of the firstsample that forms the moving average that first equals or is less thanthe threshold.

Time B₁ represents the time since the first Hall signal edge and thistime can be converted to an angle within the Hall signal:2Π(f−Δf*t)*t=θ(radians)  (19)360(f−Δf*t)*t=θ(deg)  (20)360(f−Δf*T _(B1))*T _(B1)=θ_(B1)(deg)  (21)

For Time B₂:360(f−Δf*T _(B2))*T _(B2)=θ_(B2)(deg)  (22)

An accurate estimate of the angle at which the local minimum occurred issimply the average of these two angles, i.e.θ_(B)=θ_(B2+)θ_(B1)/2  (23)

The final Alignment error can now be calculated asAlign error=(θ_(B2+)θ_(B1))/2−420 deg

Variations on the foregoing technique have been investigated and foundto be useful. For example, the Phase U BEMF can be measured against thePhase W Hall signal as shown in FIG. 4. Ideally the falling edge of theHall W signal should coincide with the local minimum in the Phase UBEMF. See FIG. 5. To calculate the Hall alignment factor, first, thetime T₁, B₁, B₂ and H (see FIGS. 2 and 5) are found. Next (B₂−B₁)/2 iscalculated to determine B (FIG. 2). Finally, the Hall alignment factorin degrees is determined as (B−H)*360/T₁.

In a third example, the Phase W BEMF is related to the Phase W Hallsignal.

Ideally the rising edge of the Hall W signal is exactly 60 degrees aheadof the local minimum in the BEMF waveform. See FIG. 6.

To calculate the Hall alignment the following steps may be applied:

Step 1: Find times T₁, B₁, B₂, H (See FIG. 7)

Step 2: Calculate B=(B₂−B₁)/2

Step 3: Calculate the Hall alignment (deg)=(B−(H−T₁/6))*360/T₁

Although the present invention has been described in relation toparticular embodiments thereof, many other variations and modificationsand other uses will become apparent to those skilled in the art.Therefore, the present invention is not limited by the specificdisclosure herein.

The method and system are advantageous in that the Hall alignmentprocedure can be carried out with the power supply inverter stillconnected to the motor. Such an arrangement is especially advantageousin that it gives the back-EMF waveform the shape shown in the Figures,including the local minimum portion.

The motor control unit is usually built into the motor enclosure as seenat 14 in FIG. 1. The CANH and CANL (controller area network high/low)lines are connectable to the motor control unit and other componentsinside the motor and, in particular, may carry the Hall signals from themotor to the communication controller. The back-EMF signals are carriedover the lines 18.

Although methods and systems are disclosed in which a phase differenceis calculated between a Phase U Hall signal and a Phase U back-EMFsignal, or between a Phase W Hall signal and a Phase W back-EMF signal,the scope of the invention extends broadly to any method or systemwherein the calculating circuit calculates a phase difference betweenthe Hall signal and the back-EMF signal of any given phase of themultiphase motor.

Although methods and systems are disclosed in which a phase differenceis calculated between a Phase W Hall signal and a Phase U back-EMFsignal, the scope of the invention extends broadly to any method orsystem wherein the calculating circuit calculates a phase differencebetween the Hall signal of any one phase and the back-EMF signal of anydifferent phase of the multiphase motor.

1. A control system for a multiphase DC motor, comprising: a multiphasemotor drive circuit; a circuit for outputting back-EMF signals from saidmotor drive circuit; a Hall effect sensors and a circuit for outputtingHall signals from said sensors, said Hall signals being indicative ofrotor position; and a calculating circuit for calculating a phasedifference between a Hall signal and a back-EMF signal and determiningfrom said phase difference an amount of an alignment error of said Halleffect sensor in said DC motor.
 2. The control system of claim 1,further comprising a memory circuit in said motor drive circuit whichstores said phase difference and corrects said rotor position bycorrecting said output Hall signals according to said phase difference.3. The control system of claim 1, comprising respective Hall signals andback-EMF signals for each phase of said motor; and wherein saidcalculating circuit calculates corresponding phase differences for eachof said phases.
 4. The control system of claim 3, further comprising amemory circuit in said motor drive circuit which stores said phasedifferences and corrects said rotor position by correcting said outputHall signals according to said phase differences.
 5. The control systemof claim 1, wherein said calculating circuit calculates a phasedifference between a Phase U Hall signal and a Phase U back-EMF signal.6. The control system of claim 1, wherein said calculating circuitcalculates a phase difference between a Phase W Hall signal and a PhaseU back-EMF signal.
 7. The control system of claim 1, wherein saidcalculating circuit calculates a phase difference between a Phase W Hallsignal and a Phase W back-EMF signal.
 8. The control system of claim 1,wherein said calculating circuit calculates said phase differencebetween a rising or falling edge of said Hall signal and a local minimumof said back-EMF signal.
 9. The control system of claim 8, wherein saidcalculating circuit calculates said local minimum of said back-EMFsignal by interpolating between rising and falling edges of saidback-EMF signal.
 10. The control system of claim 9, wherein saidcalculating circuit interpolates between points at which said rising andfalling edges of said back-EMF signal cross a predetermined threshold.11. The control system of claim 1, wherein said calculating circuitcalculates a phase difference between the Hall signal and the back-EMFsignal of a single phase of said multiphase motor.
 12. The controlsystem of claim 1, wherein said calculating circuit calculates a phasedifference between the Hall signal of one phase and the back-EMF signalof a different phase of said multiphase motor.
 13. A control method fora multiphase DC motor, said motor having a multiphase motor drivecircuit, a circuit for outputting back-EMF signals from said motor drivecircuit, a Hall effect sensors and a circuit for outputting Hall signalsfrom said sensor, said Hall signals being indicative of rotor position;said method comprising the step of calculating a phase differencebetween a Hall signal and a back-EMF signal and determining from saidphase difference an amount of an alignment error of said Hall effectsensor in said DC motor.
 14. The control method of claim 13, furthercomprising the step of storing said phase difference, and correctingsaid rotor position by correcting said output Hall signals according tosaid phase difference.
 15. The control method of claim 13, wherein thereare respective Hall signals and back-EMF signals for each phase of saidmotor; and wherein said calculating circuit calculates correspondingphase differences for each of said phases.
 16. The control method ofclaim 15, further comprising the steps of storing said phasedifferences, and correcting said rotor position by correcting saidoutput Hall signals according to said phase differences.
 17. The controlmethod of claim 13, wherein said calculating circuit calculates a phasedifference between a Phase U Hall signal and a Phase U back-EMF signal.18. The control method of claim 13, wherein said calculating circuitcalculates a phase difference between a Phase W Hall signal and a PhaseU back-EMF signal.
 19. The control method of claim 13, wherein saidcalculating circuit calculates a phase difference between a Phase W Hallsignal and a Phase W back-EMF signal.
 20. The control method of claim13, wherein said calculating circuit calculates said phase differencebetween a rising or falling edge of said Hall signal and a local minimumof said back-EMF signal.
 21. The control method of claim 20, whereinsaid calculating circuit calculates said local minimum of said back-EMFsignal by interpolating between rising and falling edges of saidback-EMF signal.
 22. The control method of claim 21, wherein saidcalculating circuit interpolates between points at which said rising andfalling edges of said back-EMF signal cross a predetermined threshold.23. The control method of claim 13, wherein said calculating circuitcalculates a phase difference between the Hall signal and the back-EMFsignal of a single phase of said multiphase motor.
 24. The controlmethod of claim 13, wherein said calculating circuit calculates a phasedifference between the Hall signal of one phase and the back-EMF signalof a different phase of said multiphase motor.